package com.galaxy.device.api;

import com.galaxy.device.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用户服务
 */
@FeignClient(
    contextId = "remoteSystemService",
    value = "galaxy-system",
    fallbackFactory = RemoteSystemFallbackFactory.class,
    configuration = FeignConfig.class
)
public interface RemoteSystemService {

    /**
     * 获取用户信息
     *
     * @param userId 用户ID
     * @return 用户信息
     */
    @RequestMapping(method = RequestMethod.GET, value = "/user/getName/{userId}")
    String getUserInfo(@PathVariable("userId") Long userId);


}
